﻿<%@ Page Title="【大乐透投注】" Language="C#" MasterPageFile="~/APP_Master/MasterPage_dlt.master"
    AutoEventWireup="true" CodeFile="dlt_bettingKillNO.aspx.cs" Inherits="dlt_betting" %>

<%@ Register Src="~/APP_Controls/ForecastPost_dlt.ascx" TagName="forecast" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        .touchu_ul1 {
            width: 100%;
            height: 140px;
            overflow-y: auto;
            overflow-x: hidden;
        }

            .touchu_ul1 dt {
                width: 100%;
                height: 28px;
                line-height: 28px;
                background: #fff6db;
                color: #333;
                padding-right: 10px;
            }

        .touchu_ul1_span1 a {
            color: #333;
        }

        .touchu_ul1_span1 {
            float: right;
            padding-right: 15px;
        }

        .touchu_ul1 dt b {
            padding-left: 10px;
            color: #000;
        }

            .touchu_ul1 dt b.touchu_ul1_b {
                padding: 0 10px;
                color: #c60000;
            }

        .lan1 {
            color: #1379d7;
        }
    </style>

    <script src="App_Themes/js/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="js/jquery-1.9.1.js" type="text/javascript"></script>

    <script src="App_Themes/js/jquery.jBox-2.3.min.js" type="text/javascript"></script>
    <script src="App_Themes/js/jquery.jBox-zh-CN.js" type="text/javascript"></script>
    <link href="App_Themes/css/Blue/jbox.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript">
        var ArrayList = new Array();
        var myRedArray = new Array();
        var myBlueArray = new Array();
        var myRedKillArray = new Array();
        var myBlueKillArray = new Array();

        var redArray = new Array();
        var blueArray = new Array();
        //------------------Start------------------
        if (getCookie("ArrayList_dlt") != '') {
            var arrarraylist = eval(getCookie("ArrayList_dlt"))
            //console.log(arrarraylist);
            for (j = 0; j < arrarraylist.length ; j++) {
                ArrayList.push(arrarraylist[j]);
            }
        }
        //console.log(ArrayList);
        console.log(sumTotal());
        //------------------End------------------
        var count = 0;

        function sumTotal() {

            var arrcount = 0;

            var cookies = getCookie("cookiestr_dlt_betting").split(",");

            if (cookies.length > 1) {

                for (var i = 0; i < cookies.length; i++) {

                    var strlist = cookies[i].split("||");

                    arrcount += parseInt(strlist[1]);

                }

            } else {

                arrcount = 0;
            }

            return arrcount;
        }

        function addRedBall(obj, value, type) {
            if (parseInt(value) <= 9) {
                value = "0" + parseInt(value);
            }
            if (type == 0) {

                var index = $.inArray(value, myRedArray);
                var index1 = $.inArray(value, myRedKillArray);
                var aa = parseInt($("#RedBall option:last").text()) + 1;

                if (myRedKillArray.length > 28) {

                    if (redArray[parseInt(value)] == undefined || redArray[parseInt(value)] == 0) {
                        if (myRedArray.length < 4) {
                            redArray[parseInt(value)] = 1;
                            myRedArray.push(value);
                            $(obj).removeClass();
                            $(obj).addClass("ball_btn_active");
                        }
                    } else if (redArray[parseInt(value)] == 1) {

                        redArray[parseInt(value)] = 0;
                        myRedArray.splice(index, 1);
                        $(obj).removeClass();
                        $(obj).addClass("ball_btn");

                    } else if (redArray[parseInt(value)] == 2) {

                        redArray[parseInt(value)] = 0;
                        myRedKillArray.splice(index1, 1);
                        $(obj).removeClass();
                        $(obj).addClass("ball_btn");
                        if (myRedKillArray.length > 14) {

                            $("#RedBall").append("<option>" + aa + "</option>");
                        }
                    }

                }
                else if (myRedKillArray.length > 14) {

                    if (myRedArray.length > 3) {

                        if (redArray[parseInt(value)] == undefined || redArray[parseInt(value)] == 0) {

                            myRedKillArray.push(value);
                            if (myRedKillArray.length < 30) {

                                $("#RedBall option:[text='" + $("#RedBall option:last").text() + "']").remove();
                            }

                            redArray[parseInt(value)] = 2;
                            $(obj).removeClass();
                            $(obj).addClass("ball_btn_active1");


                        } else if (redArray[parseInt(value)] == 1) {

                            if (index > -1) {
                                myRedArray.splice(index, 1);
                            }
                            if (myRedKillArray.length < 30) {

                                $("#RedBall option:[text='" + $("#RedBall option:last").text() + "']").remove();
                            }
                            redArray[parseInt(value)] = 2;
                            myRedKillArray.push(value);
                            $(obj).removeClass();
                            $(obj).addClass("ball_btn_active1");

                        } else if (redArray[parseInt(value)] == 2) {

                            if (myRedKillArray.length > 15) {
                                $("#RedBall").append("<option>" + aa + "</option>");
                            }
                            redArray[parseInt(value)] = 0;
                            $(obj).removeClass();

                            if (index1 > -1) {
                                myRedKillArray.splice(index1, 1);
                            }
                            $(obj).addClass("ball_btn");
                        }

                    } else if (myRedArray.length < 4) {

                        if (redArray[parseInt(value)] == undefined || redArray[parseInt(value)] == 0) {

                            redArray[parseInt(value)] = 1;
                            myRedArray.push(value);
                            $(obj).removeClass();
                            $(obj).addClass("ball_btn_active");


                        } else if (redArray[parseInt(value)] == 1) {

                            redArray[parseInt(value)] = 2;
                            if (myRedKillArray.length < 29) {

                                $("#RedBall option:[text='" + $("#RedBall option:last").text() + "']").remove();
                            }
                            if (index > -1) {
                                myRedArray.splice(index, 1);
                            }
                            myRedKillArray.push(value);
                            $(obj).addClass("ball_btn_active1");

                        } else if (redArray[parseInt(value)] == 2) {
                            if (myRedKillArray.length > 15) {
                                $("#RedBall").append("<option>" + aa + "</option>");
                            }
                            redArray[parseInt(value)] = 0;
                            $(obj).removeClass();

                            if (index1 > -1) {
                                myRedKillArray.splice(index1, 1);
                            }
                            $(obj).addClass("ball_btn");
                        }
                    }

                }

                else if (myRedArray.length > 3) {

                    if (redArray[parseInt(value)] == undefined || redArray[parseInt(value)] == 0) {

                        myRedKillArray.push(value);
                        redArray[parseInt(value)] = 2;
                        $(obj).removeClass();
                        $(obj).addClass("ball_btn_active1");

                    } else if (redArray[parseInt(value)] == 1) {

                        if (index > -1) {
                            myRedArray.splice(index, 1);
                        }
                        redArray[parseInt(value)] = 2;
                        myRedKillArray.push(value);
                        $(obj).removeClass();
                        $(obj).addClass("ball_btn_active1");

                    } else if (redArray[parseInt(value)] == 2) {
                        redArray[parseInt(value)] = 0;
                        $(obj).removeClass();

                        if (index1 > -1) {
                            myRedKillArray.splice(index1, 1);
                        }
                        $(obj).addClass("ball_btn");
                    }

                }

                else if (myRedArray.length < 4) {

                    if (redArray[parseInt(value)] == undefined || redArray[parseInt(value)] == 0) {

                        redArray[parseInt(value)] = 1;
                        myRedArray.push(value);
                        $(obj).removeClass();
                        $(obj).addClass("ball_btn_active");


                    } else if (redArray[parseInt(value)] == 1) {
                        redArray[parseInt(value)] = 2;

                        if (index > -1) {
                            myRedArray.splice(index, 1);
                        }
                        myRedKillArray.push(value);
                        $(obj).addClass("ball_btn_active1");

                    } else if (redArray[parseInt(value)] == 2) {
                        redArray[parseInt(value)] = 0;
                        $(obj).removeClass();

                        if (index1 > -1) {
                            myRedKillArray.splice(index1, 1);
                        }
                        $(obj).addClass("ball_btn");
                    }
                }

            }
            else if (type == 1) {
                var BlueIndex = $.inArray(value, myBlueArray);
                var BlueIndex1 = $.inArray(value, myBlueKillArray);
                if (myBlueKillArray.length > 10) {

                    if (blueArray[parseInt(value)] == undefined || blueArray[parseInt(value)] == 0) {

                        myBlueArray.push(value);

                        blueArray[parseInt(value)] = 1;

                        $(obj).removeClass();

                        $(obj).addClass("ball_btn_active");

                    } else if (blueArray[parseInt(value)] == 1) {

                        if (BlueIndex > -1) {

                            myBlueArray.splice(BlueIndex, 1);
                        }
                        blueArray[parseInt(value)] = 0;
                        $(obj).removeClass();
                        $(obj).addClass("ball_btn");
                    } else if (blueArray[parseInt(value)] == 2) {
                        if (BlueIndex1 > -1) {
                            myBlueKillArray.splice(BlueIndex1, 1);
                        }
                        blueArray[parseInt(value)] = 0;
                        $(obj).removeClass();
                        $(obj).addClass("ball_btn");
                        $("#BlueBall").append("<option>2</option>");
                    }
                } else if (blueArray[parseInt(value)] == undefined || blueArray[parseInt(value)] == 0) {

                    myBlueArray.push(value);
                    blueArray[parseInt(value)] = 1;
                    $(obj).addClass("ball_btn_active");
                    //alert($("#BlueBall option:first").text());
                    if (myBlueArray.length > 2) {
                        var aa = $("#BlueBall option:first").text();
                        $("#BlueBall option:[text='" + $("#BlueBall option:first").text() + "']").remove();

                    }

                } else if (blueArray[parseInt(value)] == 1) {

                    if (BlueIndex > -1) {
                        myBlueArray.splice(BlueIndex, 1);
                    }
                    myBlueKillArray.push(value);
                    blueArray[parseInt(value)] = 2;
                    $(obj).addClass("ball_btn_active1");
                    jQuery("#BlueBall option:[text='" + jQuery("#BlueBall option:last").text() + "']").remove();

                    var aa = parseInt($("#BlueBall option:first").text()) - 1;

                    if (myBlueArray.length > 2) {

                        $("#BlueBall").prepend("<option>" + aa + "</option>");
                        $("#BlueBall option[text=" + aa + "]").attr("selected", true);

                    } else if (myBlueArray.length == 2) {
                        $("#BlueBall").prepend("<option>2</option>");
                        $("#BlueBall option[text=2]").attr("selected", true);
                    }

                } else if (blueArray[parseInt(value)] == 2) {

                    if (BlueIndex1 > -1) {
                        myBlueKillArray.splice(BlueIndex1, 1);
                    }

                    blueArray[parseInt(value)] = 0;
                    $(obj).removeClass();
                    $(obj).addClass("ball_btn");
                    var aa = parseInt($("#BlueBall option:last").text()) + 1;
                    $("#BlueBall").append("<option>" + aa + "</option>");
                }
            }

            jQuery("#redballCout").html(myRedArray.length);
            jQuery("#blueCount").html(myBlueArray.length);


            var aa = myRedArray.length;  //胆拖

            var bb = $("#RedBall").val() - myRedArray.length;

            var blue = $("#BlueBall").val();

            if (myRedArray.length == 0) {

                count = parseInt((fibonacci(bb) / fibonacci(5) / fibonacci(bb - 5)) * (fibonacci(blue) / fibonacci(2) / fibonacci(blue - 2)));

            } else {

                count = parseInt(fibonacci(bb) / fibonacci(5 - aa) / fibonacci(bb - 5 + aa) * (fibonacci(blue) / fibonacci(2) / fibonacci(blue - 2)));

            }

            jQuery("#totalCout").html(count * $("#Group").val());
            jQuery("#zhushu").html(count * $("#Group").val());
            jQuery("#totalMoney").html(count * $("#Group").val() * 2);

        }

        function fibonacci(n) {
            var rtn = 1;
            if (n > 1) {
                var i = 1;
                while (i <= n) {
                    rtn = rtn * i;
                    i++;
                }
            }
            return rtn;
        }

        function displayck() {
            document.getElementById("myselfDiv").style.display = "none";
        }

        function displaycl() {
            document.getElementById("myselfDiv").style.display = "block";
        }

        function setgongkai(obj) {
            document.getElementById("gongkaiHid").value = obj;
        }

        function login() {

            $("#box11 .011").trigger('click');
        }
        function addBuyInfo() {

            $.ajax({
                type: "get",
                dataType: "text",
                url: "Ajax/CMember.ashx?",
                data: { t: 'GetLoginInfo' },
                success: function (data) {
                    if (data.indexOf('请登录') != -1) {
                        login();
                        return false;
                    }
                    else {
                        if (getCookie('ArrayList') != '') {
                            ArrayList = eval(getCookie('ArrayList'));
                            document.getElementById("lotteryStr").value = ArrayList
                            console.log(ArrayList);
                        }
                        else {
                            document.getElementById("lotteryStr").value = ArrayList;
                            console.log(ArrayList);
                        }
                        if (ArrayList.length < 1) {
                            alert("请选择投注号码！");
                        }
                        else {
                            if (document.getElementById("lookXieyi").checked) {
                                clearCookie("cookiestr_double_betting");
                                clearCookie("cookiestr_double_betting_arrcount");
                                clearCookie("ArrayList");
                                if (document.getElementById("myself").checked) {
                                    jQuery('form').attr("action", "/Ajax/CMember.ashx?t=newarrayByMy&type=2&qs=<%=lotteryqs!=null?lotteryqs.Lotteryqs:"0000000"%>").submit();

                                }
                                if (document.getElementById("together").checked) {
                                    if (document.getElementById("lotteryName").value == "") {
                                        alert("请输入方案标题！")
                                    }
                                    else {
                                        if (document.getElementById("lotteryxy").value == "") {
                                            alert("请输入合买宣言！")
                                        }
                                        else {
                                            jQuery('form').attr("action", "/Ajax/CMember.ashx?t=newarrayByTogether&type=2&qs=<%=lotteryqs!=null?lotteryqs.Lotteryqs:"0000000"%>").submit();
                                        }
                                    }
                                }
                            }
                            else {
                                alert("请阅读协议");
                            }
                        }
                    }
                }
            });
        }



        function RandomNumber(num, shuzulength) {
            var arr = [];
            var json = {};
            while (arr.length < num) {
                //产生单个随机数
                var ranNum = parseInt(shuzulength * Math.random());
                //通过判断json对象的索引值是否存在 来标记 是否重复
                if (!json[ranNum]) {
                    json[ranNum] = 1;
                    arr.push(ranNum);
                }

            }
            return arr;
        }

        function dtAddChild() {

            var shuzu = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35);

            var shuzuBlue = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);

            for (var i = 0; i < myRedArray.length; i++) {

                var index = $.inArray(parseInt(myRedArray[i]), shuzu);

                if (index > -1) {

                    shuzu.splice(index, 1);
                }
            }

            for (var j = 0; j < myRedKillArray.length; j++) {

                var index = $.inArray(parseInt(myRedKillArray[j]), shuzu);

                if (index > -1) {

                    shuzu.splice(index, 1);
                }
            }

            for (var m = 0; m < myBlueArray.length; m++) {

                var index = $.inArray(parseInt(myBlueArray[m]), shuzuBlue);

                if (index > -1) {

                    shuzuBlue.splice(index, 1);
                }
            }

            for (var n = 0; n < myBlueKillArray.length; n++) {

                var index = $.inArray(parseInt(myBlueKillArray[n]), shuzuBlue);

                if (index > -1) {

                    shuzuBlue.splice(index, 1);
                }
            }

            //  生成红球随机数个数
            var reDomCon = parseInt($("#RedBall").val()) - myRedArray.length;

            //  生成蓝球随机数个数
            var blueDomCon = parseInt($("#BlueBall").val()) - myBlueArray.length;

            var redstr = "";
            var blustr = "";

            for (var i = 0; i < myRedArray.length; i++) {

                redstr += myRedArray[i] + "*";
            }

            redstr = redstr.substring(0, redstr.length - 1);

            for (var i = 0; i < myBlueArray.length; i++) {

                blustr += myBlueArray[i] + "*";
            }
            blustr = blustr.substring(0, blustr.length - 1);

            for (var x = 0; x < $("#Group").val() ; x++) {

                var red = "";

                if (myRedArray.length > 0) {

                    red = "$";
                }
                // alert(shuzu.length); alert(reDomCon);
                var aa = RandomNumber(reDomCon, shuzu.length);

                var blueXiabiao = RandomNumber(blueDomCon, shuzuBlue.length);

                for (var z = 0; z < aa.length; z++) {

                    var xiabiao = aa[z];

                    if (shuzu[xiabiao] < 10) {

                        shuzu[xiabiao] = "0" + parseInt(shuzu[xiabiao]);
                    }
                    if (z == aa.length - 1) {

                        red += shuzu[xiabiao];

                    } else {

                        red += shuzu[xiabiao] + ",";
                    }

                }

                var blue = "";

                if (myBlueArray.length > 0) {

                    blue = ",";
                }
                if (myBlueArray.length == $("#BlueBall").val()) {

                    blue = blue.substring(0, blue.length - 1);
                }

                for (var v = 0; v < blueXiabiao.length; v++) {

                    if (shuzuBlue[blueXiabiao[v]] < 10) {

                        shuzuBlue[blueXiabiao[v]] = "0" + parseInt(shuzuBlue[blueXiabiao[v]]);
                    }
                    if (v == blueXiabiao.length - 1) {

                        blue += shuzuBlue[blueXiabiao[v]];

                    } else {

                        blue += shuzuBlue[blueXiabiao[v]] + ",";
                    }

                }

                $('.touchu_ul1').append('<dt ><span class="touchu_ul1_span1" ><a href="JavaScript:void(0);" onclick="javascript:del(this);">删除</a></span><b >投注</b><b class="touchu_ul1_b" >'

                    + myRedArray + red + ' + <span class="lan1" >' + myBlueArray + blue + '</span></b> [' + $("#totalCout").html() / $("#Group").val() + '注,' + $("#totalMoney").html() / $("#Group").val() + '元]</dt>');

                //    $('.touchu_ul1').append('<dt ><span class="touchu_ul1_span1" ><a href="JavaScript:void(0);" onclick="javascript:del(this);">删除</a></span><b >投注</b><b class="touchu_ul1_b" >'
                //+ myRedArray + ' + <span class="lan1" >' + myBlueArray + '</span></b> [' + count + '注,' + count * 2 + '元]</dt>');

                red = red.replace(/,/g, "*");

                blue = blue.replace(/,/g, "*");

                //alert(redstr);

                var xuanhao = redstr + red + "+" + blustr + blue;

                ArrayList.push(xuanhao);

                var cookiestr = '';

                var fgf = '';

                if (getCookie("cookiestr_dlt_betting") != "") {

                    cookiestr = getCookie("cookiestr_dlt_betting");
                    fgf = ","
                }

                cookiestr += fgf + xuanhao + "||" + $("#totalCout").html() / $("#Group").val() + "||" + $("#totalMoney").html() / $("#Group").val();

                setCookie("cookiestr_dlt_betting", cookiestr, 365);

                var json = JSON.stringify(ArrayList)

                setCookie("ArrayList_dlt", json, 365);

                var group = $("#Group").val() - 1;

                if (x == group) {

                    for (var myred = 0; myred < myRedArray.length; myred++) {

                        $("#RedBall" + parseInt(myRedArray[myred])).removeClass();

                        $("#RedBall" + parseInt(myRedArray[myred])).addClass("ball_btn");

                        redArray[parseInt(myRedArray[myred])] = 0;
                    }
                    for (var myredkill = 0; myredkill < myRedKillArray.length; myredkill++) {

                        $("#RedBall" + parseInt(myRedKillArray[myredkill])).removeClass();

                        $("#RedBall" + parseInt(myRedKillArray[myredkill])).addClass("ball_btn");

                        redArray[parseInt(myRedKillArray[myredkill])] = 0;

                    }

                    for (var myblue = 0; myblue < myBlueArray.length; myblue++) {

                        $("#BlueBall" + parseInt(myBlueArray[myblue])).removeClass();

                        $("#BlueBall" + parseInt(myBlueArray[myblue])).addClass("ball_btn");

                        blueArray[parseInt(myBlueArray[myblue])] = 0;
                    }

                    for (var myblueKill = 0; myblueKill < myBlueKillArray.length; myblueKill++) {

                        $("#BlueBall" + parseInt(myBlueKillArray[myblueKill])).removeClass();

                        $("#BlueBall" + parseInt(myBlueKillArray[myblueKill])).addClass("ball_btn");

                        blueArray[parseInt(myBlueKillArray[myblueKill])] = 0;
                    }

                    myRedArray = new Array();
                    myBlueArray = new Array();
                    myBlueKillArray = new Array();
                    myRedKillArray = new Array();


                    $("#Group").find("option[text='5']").attr("selected", true);

                    $("#RedBall").find("option").remove();

                    $("#BlueBall").empty();

                    SelectAddOrDel(6, 21, "RedBall");

                    SelectAddOrDel(1, 17, "BlueBall");

                    jQuery("#totalCout").html("5");

                    jQuery("#totalMoney").html("10");

                    var arrcount = sumTotal();

                    jQuery("#yourSelect").html(arrcount);

                    jQuery("#zhushu").html(arrcount);

                    jQuery("#yourMoney").html(arrcount * 2);
                }
            }
        }

        function SelectAddOrDel(star, end, id) {

            for (var h = star; h < end; h++) {

                $("#" + id).append("<option>" + h + "</option>");
            }
        }

        function del(obj) {
            //-----------------Start-----------------------
            if (getCookie('ArrayList_dlt') != '') {
                ArrayList = eval(getCookie('ArrayList_dlt'));
            }
            //------------------End----------------------
            $(obj).parent().parent().remove();
            var num = $(obj).parent().parent().children(".touchu_ul1_b").text();
            num = num.replace(/\s/g, "");
            num = num.replace(/,/g, "*");
            var index = $.inArray(num, ArrayList);
            //-----------------Start-----------------------
            console.log(num);
            console.log(ArrayList);
            var arrdddd = getCookie('cookiestr_dlt_betting').split(",")
            //console.log(ArrayList);
            strnum = arrdddd[index].split("||");
            //----------------End------------------------
            if (index > -1) {
                ArrayList.splice(index, 1);
                arrdddd.splice(index, 1);
            }
            //-----------------Start-----------------------
            var straaaa = '';
            for (i = 0; i < arrdddd.length; i++) {
                straaaa += arrdddd[i];
                if (i < arrdddd.length - 1) {
                    straaaa += ',';
                }
            }
            setCookie('cookiestr_dlt_betting', straaaa, 365);
            var json = JSON.stringify(ArrayList)
            setCookie('ArrayList_dlt', json, 365);
            strnum = strnum[1]
            setCookie('cookiestr_dlt_betting_arrcount', getCookie('cookiestr_dlt_betting_arrcount') - strnum, 365);
            //----------------End------------------------
            var arrcount = sumTotal();
            jQuery("#yourSelect").html(arrcount);
            jQuery("#zhushu").html(arrcount);
            var a = document.getElementById("yourMulti").value;
            jQuery("#yourMoney").html(arrcount * 2 * a);
            var mymoney = document.getElementById("mymoney");
            calculateMyrg(mymoney);//计算最小认购
        }

        function getQLCRandom() {
            var prevArray = [];
            for (var i = 0; i < 5; i++) {
                var prevArea = parseInt(Math.floor(Math.random() * 34)) + 1;
                do {
                    var flag = false;
                    for (var j = 0; j < prevArray.length; j++) {
                        if (parseInt(prevArray[j]) == parseInt(prevArea)) { flag = true; break; }
                    }
                    if (!flag) {
                        if (parseInt(prevArea) <= 9) {
                            prevArea = "0" + parseInt(prevArea);
                        }
                        prevArray[i] = prevArea;
                    }
                    else {
                        prevArea = parseInt(Math.floor(Math.random() * 34)) + 1;
                        if (parseInt(prevArea) <= 9) {
                            prevArea = "0" + parseInt(prevArea);
                        }
                    }
                }
                while (flag);
            }
            prevArray.sort(function (a, b) { return a > b ? 1 : -1 });
            return prevArray;
        }

        function getDLTRandom() {
            var lastArray = [];
            for (var i = 0; i < 2; i++) {
                var lastArea = parseInt(Math.floor(Math.random() * 11)) + 1;
                do {
                    var flag = false;
                    for (var j = 0; j < lastArray.length; j++) {
                        if (parseInt(lastArray[j]) == parseInt(lastArea)) { flag = true; break; }
                    }
                    if (!flag) {
                        if (parseInt(lastArea) <= 9) {
                            lastArea = "0" + parseInt(lastArea);
                        }
                        lastArray[i] = lastArea;
                    }
                    else {
                        lastArea = parseInt(Math.floor(Math.random() * 11)) + 1;
                        if (parseInt(lastArea) <= 9) {
                            lastArea = "0" + parseInt(lastArea);
                        }
                    }
                }
                while (flag);
            }
            lastArray.sort(function (a, b) { return a > b ? 1 : -1 });
            return lastArray;
        }

        function getPL3Random(num) {
            for (var i = 0; i < num; i++) {
                var strq = getQLCRandom();
                var strh = getDLTRandom();
                var ballstr = strq[0] + '*' + strq[1] + '*' + strq[2] + '*' + strq[3] + '*' + strq[4] + "+" + strh[0] + '*' + strh[1];
                $('.touchu_ul1').append('<dt ><span class="touchu_ul1_span1" ><a href="JavaScript:void(0);" onclick="javascript:del(this);">删除</a></span><b >投注</b><b class="touchu_ul1_b" >'
                + strq + ' + <span class="lan1" >' + strh + '</span></b> [1注,2元]</dt>');
                ArrayList.push(ballstr);
                //-----------------Start-----------------------
                var cookiestr = '';
                var fgf = '';
                if (getCookie("cookiestr_dlt_betting") != "") {
                    cookiestr = getCookie("cookiestr_dlt_betting");
                    fgf = ","
                }
                cookiestr += fgf + ballstr + "||1||2";
                setCookie("cookiestr_dlt_betting", cookiestr, 365);
                //-----------------End-----------------------
            }
            var arrcount = sumTotal();
            if (arrcount == 0) {
                arrcount = 1;
            }
            jQuery("#yourSelect").html(arrcount);
            jQuery("#zhushu").html(arrcount);
            var a = document.getElementById("yourMulti").value;
            jQuery("#yourMoney").html(arrcount * 2 * a);
            //-----------------Start-----------------------
            setCookie("cookiestr_dlt_betting_arrcount", arrcount, 365);
            var json = JSON.stringify(ArrayList)
            setCookie("ArrayList_dlt", json, 365);
            //-----------------End-----------------------
            var mymoney = document.getElementById("mymoney");
            calculateMyrg(mymoney);//计算最小认购
        }


        //-----------------Start-----------------------
        $(document).ready(function () {

            var cookies_dlt_betting = getCookie("cookiestr_dlt_betting")

            var arr_cookies = cookies_dlt_betting.split(",");

            var cookie_html = '';

            for (var i = 0; i < arr_cookies.length; i++) {

                //console.log(arr_cookies[i]);
                var arraaaa = arr_cookies[i].split("||");

                var arrbbbb = arraaaa[0].split("+");

                //var ccccccc = arrbbbb[0].replace(/\*/g, ",")

                cookie_html += '<dt ><span class="touchu_ul1_span1" ><a href="JavaScript:void(0);" onclick="javascript:del(this);">删除</a></span><b >投注</b><b class="touchu_ul1_b" >'
                        + arrbbbb[0] + ' + <span class="lan1" >' + arrbbbb[1] + '</span></b> [' + arraaaa[1] + '注,' + arraaaa[2] + '元]</dt>'


            }

            var noteNO = sumTotal();

            $("#yourSelect").html(noteNO);

            $("#yourMoney").html(noteNO * 2);

            var selfBuying = $("#yourMoney").html() * 0.05;

            $("#mymoney").val(Math.round(selfBuying));

            $("#rengou").html($("#mymoney").val());

            if (cookies_dlt_betting != '') {

                $(".touchu_ul1").html(cookie_html);

                $("#zhushu").html(noteNO);

            }

            $("#RedBall").change(function () {

                var aa = myRedArray.length;  //胆拖

                var bb = $("#RedBall").val() - myRedArray.length;

                var blue = $("#BlueBall").val();

                if (myRedArray.length == 0) {

                    count = parseInt((fibonacci(bb) / fibonacci(5) / fibonacci(bb - 5)) * (fibonacci(blue) / fibonacci(2) / fibonacci(blue - 2)));

                } else {

                    count = parseInt(fibonacci(bb) / fibonacci(5 - aa) / fibonacci(bb - 5 + aa) * (fibonacci(blue) / fibonacci(2) / fibonacci(blue - 2)));

                }

                jQuery("#totalCout").html(count * $("#Group").val());

                jQuery("#zhushu").html(count * $("#Group").val());

                jQuery("#totalMoney").html(count * $("#Group").val() * 2);

            })

            $("#BlueBall").change(function () {

                var aa = myRedArray.length;  //胆拖

                var bb = $("#RedBall").val() - myRedArray.length;

                var blue = $("#BlueBall").val();

                if (myRedArray.length == 0) {

                    count = parseInt((fibonacci(bb) / fibonacci(5) / fibonacci(bb - 5)) * (fibonacci(blue) / fibonacci(2) / fibonacci(blue - 2)));

                } else {

                    count = parseInt(fibonacci(bb) / fibonacci(5 - aa) / fibonacci(bb - 5 + aa) * (fibonacci(blue) / fibonacci(2) / fibonacci(blue - 2)));

                }

                jQuery("#totalCout").html(count * $("#Group").val());

                jQuery("#zhushu").html(count * $("#Group").val());

                jQuery("#totalMoney").html(count * $("#Group").val() * 2);
            })

            $("#Group").change(function () {

                var aa = myRedArray.length;  //胆拖

                var bb = $("#RedBall").val() - myRedArray.length;

                var blue = $("#BlueBall").val();

                if (myRedArray.length == 0) {

                    count = parseInt((fibonacci(bb) / fibonacci(5) / fibonacci(bb - 5)) * (fibonacci(blue) / fibonacci(2) / fibonacci(blue - 2)));

                } else {

                    count = parseInt(fibonacci(bb) / fibonacci(5 - aa) / fibonacci(bb - 5 + aa) * (fibonacci(blue) / fibonacci(2) / fibonacci(blue - 2)));

                }

                jQuery("#totalCout").html(count * $("#Group").val());

                jQuery("#zhushu").html(count * $("#Group").val());

                jQuery("#totalMoney").html(count * $("#Group").val() * 2);
            })

        });
        //-----------------End-----------------------



        function clearAll() {
            clearCookie("cookiestr_dlt_betting");
            clearCookie("cookiestr_dlt_betting_arrcount");
            clearCookie("ArrayList_dlt");
            lotterystr = "";
            ArrayList = new Array();
            count = 0;
            jQuery("#yourSelect").html(count);
            jQuery("#zhushu").html(0);
            jQuery("#yourMoney").html(count * 2);
            $(".touchu_ul1_span1").parent().remove();
        }

        function clearupAll() {
            myRedArray = new Array();
            myBlueArray = new Array();
            count = 0;
            jQuery("#redballCout").html(myRedArray.length);
            jQuery("#blueCount").html(myBlueArray.length);
            jQuery("#totalCout").html(0);
            jQuery("#totalMoney").html(0);
            jQuery("#zhushu").html(0);
            $(".ball_btn_active").removeClass("ball_btn_active");
        }

        function fillB() {

            var reg = new RegExp("^[0-9]*$");

            var aa = "";

            if (parseInt($("#yourMulti").val()) > 0) {

                aa = $("#yourMulti").val() * 2 * $("#yourSelect").html();

                $("#yourMoney").html(aa);

            } if (!reg.test($("#yourMulti").val())) {

                $("#yourMulti").val("1");

                aa = $("#yourMulti").val() * 2 * $("#yourSelect").html();

                $("#yourMoney").html(aa);

            }


            //var arrcount = sumTotal();

            //$("#yourMoney").html(arrcount * 2 * $("#yourMulti").text());
            ////alert($("#yourMoney").text());
            //var mymoney = document.getElementById("mymoney");

            //calculateMyrg(mymoney);//计算最小认购
            $("#mymoney").val(Math.round(aa * 0.5));
            $("#mybd").val(Math.round(aa * 0.5));
        }

        function setSelectValue() {
            var a = document.getElementById("ticheng").value;
            document.getElementById("selectHid").value = a;
        }

        function calculateMyrg(obj) {
            var account = sumTotal();
            var reg = new RegExp("^[0-9]*$");
            if (!reg.test(obj.value)) {
                obj.value = 0;
            }
            if (parseInt(obj.value) < Math.round(account * 2 * 0.05 * jQuery("#yourMulti").val())) {
                obj.value = Math.round(account * 2 * 0.05 * jQuery("#yourMulti").val());
            }
            if (parseInt(obj.value) > account * 2 * jQuery("#yourMulti").val()) {
                obj.value = account * 2 * jQuery("#yourMulti").val();
            }
            jQuery("#rengou").html(jQuery("#mymoney").val());
            jQuery("#zhifu").html(parseInt(jQuery("#rengou").html() * 1) + parseInt(jQuery("#mybd").val() * 1));

            if (parseInt(obj.value) > parseInt(account * 2 * jQuery("#yourMulti").val() - jQuery("#mybd").val())) {
                var ss = parseInt(account * 2 * jQuery("#yourMulti").val() - jQuery("#mymoney").val());
                document.getElementById("mybd").value = ss;
            } else {
                jQuery("#mybd").html(obj.value * 1);
            }
            jQuery("#baodi").html(jQuery("#mybd").val());
            jQuery("#zhifu").html(parseInt(jQuery("#rengou").html() * 1) + parseInt(jQuery("#mybd").val() * 1));
        }

        function calculateMybd(obj) {

            var account = sumTotal();

            var reg = new RegExp("^[0-9]*$");

            if (parseInt(obj.value) > 0) {

                obj.value = parseInt(obj.value);

            } if (!reg.test(obj.value)) {

                obj.value = 0;

            } else if (parseInt(obj.value) < 0) {

                obj.value = 0;
            }

            //发起人最低购买 5%，，最高认购不能超过， 总金额-发起人最低认购 
            var MaxRenGou = $("#yourMoney").text() - Math.round(jQuery("#yourMoney").text() * 0.05);

            if (parseInt(obj.value) > MaxRenGou) {

                obj.value = MaxRenGou;

            } else {

                $("#mybd").html(obj.value * 1)

            }

            jQuery("#baodi").html(jQuery("#mybd").val());

            jQuery("#zhifu").html(parseInt(jQuery("#rengou").html() * 1) + parseInt(jQuery("#mybd").val() * 1));
        }

        //设置cookie
        function setCookie(cname, cvalue, exdays) {
            var d = new Date();
            d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
            var expires = "expires=" + d.toUTCString();
            document.cookie = cname + "=" + cvalue + "; " + expires;
        }

        //获取cookie
        function getCookie(cname) {
            var name = cname + "=";
            var ca = document.cookie.split(';');
            for (var i = 0; i < ca.length; i++) {
                var c = ca[i];
                while (c.charAt(0) == ' ') c = c.substring(1);
                if (c.indexOf(name) != -1) return c.substring(name.length, c.length);
            }
            return "";
        }

        //清除cookie  
        function clearCookie(name) {
            setCookie(name, "", -1);
        }

    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <!--BettingContent-->
    <div class="betting_content">
        <!--Left-->
        <div class="betting_left">
            <h2 class="betting_prompt">
                <b>玩法提示：</b>同一个号码点击一下为"定胆"、点击两下为"杀号"、点击三下"还原"<%--<em>1000</em>，追加可中<em>1600</em>万元--%>
            
            </h2>
            <!--Choose-->
            <div class="betting_choose_ball_box">
                <div>
                    <div class="betting_choose_redball">
                        <h2><b>前区</b> 最多可设4个胆，超出后，点击选号默认为杀号</h2>
                        <div class="betting_prompt_left">
                            <h4 class="choose">选号</h4>
                            <h3>
                                <p>遗漏</p>
                                <div><b>遗漏：</b>指该号码自上次开出以来至本次末出现的期数</div>
                            </h3>
                        </div>
                        <input type="hidden" id="ZXRedBll" name="ZXRedBll" />
                        <input type="hidden" id="ZXBlueBll" name="ZXBlueBll" />
                        <input type="hidden" id="lotteryStr" name="lotteryStr" />
                        <input type="hidden" id="DTRed" name="DTRed" />
                        <ul class="betting_choose_ball">
                            <li><em id="RedBall1" class="ball_btn" onclick="javascript:addRedBall(this,1,0,0);">01</em> <span id="MissNper1" runat="server"></span></li>
                            <li><em id="RedBall2" class="ball_btn" onclick="javascript:addRedBall(this,2,0,0);">02</em> <span id="MissNper2" runat="server"></span></li>
                            <li><em id="RedBall3" class="ball_btn" onclick="javascript:addRedBall(this,3,0,0);">03</em> <span id="MissNper3" runat="server"></span></li>
                            <li><em id="RedBall4" class="ball_btn" onclick="javascript:addRedBall(this,4,0,0);">04</em> <span id="MissNper4" runat="server"></span></li>
                            <li><em id="RedBall5" class="ball_btn" onclick="javascript:addRedBall(this,5,0,0);">05</em> <span id="MissNper5" runat="server"></span></li>
                            <li><em id="RedBall6" class="ball_btn" onclick="javascript:addRedBall(this,6,0,0);">06</em> <span id="MissNper6" runat="server"></span></li>
                            <li><em id="RedBall7" class="ball_btn" onclick="javascript:addRedBall(this,7,0,0);">07</em> <span id="MissNper7" runat="server"></span></li>
                            <li><em id="RedBall8" class="ball_btn" onclick="javascript:addRedBall(this,8,0,0);">08</em> <span id="MissNper8" runat="server"></span></li>
                            <li><em id="RedBall9" class="ball_btn" onclick="javascript:addRedBall(this,9,0,0);">09</em> <span id="MissNper9" runat="server"></span></li>
                            <li><em id="RedBall10" class="ball_btn" onclick="javascript:addRedBall(this,10,0,0);">10</em> <span id="MissNper10" runat="server"></span></li>
                            <li><em id="RedBall11" class="ball_btn" onclick="javascript:addRedBall(this,11,0,0);">11</em> <span id="MissNper11" runat="server"></span></li>
                            <li><em id="RedBall12" class="ball_btn" onclick="javascript:addRedBall(this,12,0,0);">12</em> <span id="MissNper12" runat="server"></span></li>
                            <li><em id="RedBall13" class="ball_btn" onclick="javascript:addRedBall(this,13,0,0);">13</em> <span id="MissNper13" runat="server"></span></li>
                            <li><em id="RedBall14" class="ball_btn" onclick="javascript:addRedBall(this,14,0,0);">14</em> <span id="MissNper14" runat="server"></span></li>
                            <li><em id="RedBall15" class="ball_btn" onclick="javascript:addRedBall(this,15,0,0);">15</em> <span id="MissNper15" runat="server"></span></li>
                            <li><em id="RedBall16" class="ball_btn" onclick="javascript:addRedBall(this,16,0,0);">16</em> <span id="MissNper16" runat="server"></span></li>
                            <li><em id="RedBall17" class="ball_btn" onclick="javascript:addRedBall(this,17,0,0);">17</em> <span id="MissNper17" runat="server"></span></li>
                            <li><em id="RedBall18" class="ball_btn" onclick="javascript:addRedBall(this,18,0,0);">18</em> <span id="MissNper18" runat="server"></span></li>
                            <li><em id="RedBall19" class="ball_btn" onclick="javascript:addRedBall(this,19,0,0);">19</em> <span id="MissNper19" runat="server"></span></li>
                            <li><em id="RedBall20" class="ball_btn" onclick="javascript:addRedBall(this,20,0,0);">20</em> <span id="MissNper20" runat="server"></span></li>
                            <li><em id="RedBall21" class="ball_btn" onclick="javascript:addRedBall(this,21,0,0);">21</em> <span id="MissNper21" runat="server"></span></li>
                            <li><em id="RedBall22" class="ball_btn" onclick="javascript:addRedBall(this,22,0,0);">22</em> <span id="MissNper22" runat="server"></span></li>
                            <li><em id="RedBall23" class="ball_btn" onclick="javascript:addRedBall(this,23,0,0);">23</em> <span id="MissNper23" runat="server"></span></li>
                            <li><em id="RedBall24" class="ball_btn" onclick="javascript:addRedBall(this,24,0,0);">24</em> <span id="MissNper24" runat="server"></span></li>
                            <li><em id="RedBall25" class="ball_btn" onclick="javascript:addRedBall(this,25,0,0);">25</em> <span id="MissNper25" runat="server"></span></li>
                            <li><em id="RedBall26" class="ball_btn" onclick="javascript:addRedBall(this,26,0,0);">26</em> <span id="MissNper26" runat="server"></span></li>
                            <li><em id="RedBall27" class="ball_btn" onclick="javascript:addRedBall(this,27,0,0);">27</em> <span id="MissNper27" runat="server"></span></li>
                            <li><em id="RedBall28" class="ball_btn" onclick="javascript:addRedBall(this,28,0,0);">28</em> <span id="MissNper28" runat="server"></span></li>
                            <li><em id="RedBall29" class="ball_btn" onclick="javascript:addRedBall(this,29,0,0);">29</em> <span id="MissNper29" runat="server"></span></li>
                            <li><em id="RedBall30" class="ball_btn" onclick="javascript:addRedBall(this,30,0,0);">30</em> <span id="MissNper30" runat="server"></span></li>
                            <li><em id="RedBall31" class="ball_btn" onclick="javascript:addRedBall(this,31,0,0);">31</em> <span id="MissNper31" runat="server"></span></li>
                            <li><em id="RedBall32" class="ball_btn" onclick="javascript:addRedBall(this,32,0,0);">32</em> <span id="MissNper32" runat="server"></span></li>
                            <li><em id="RedBall33" class="ball_btn" onclick="javascript:addRedBall(this,33,0,0);">33</em> <span id="MissNper33" runat="server"></span></li>
                            <li><em id="RedBall34" class="ball_btn" onclick="javascript:addRedBall(this,34,0,0);">34</em> <span id="MissNper34" runat="server"></span></li>
                            <li><em id="RedBall35" class="ball_btn" onclick="javascript:addRedBall(this,35,0,0);">35</em> <span id="MissNper35" runat="server"></span></li>
                        </ul>
                        <%--  <div class="betting_choose_div">
                    <asp:DropDownList ID="DropDownList1" runat="server" class="steps_input">
                        <asp:ListItem>6</asp:ListItem>
                    </asp:DropDownList>
                    <a href="" class="choose_red_ball">机选红球</a>
                    <a href="" class="ball_clear">清空</a>
                </div>--%>
                    </div>
                    <div class="betting_choose_blueball">
                        <h2><b>后区</b> </h2>
                        <ul class="betting_choose_blue_ball">
                            <li><em id="BlueBall1" class="ball_btn" onclick="javascript:addRedBall(this,1,1,0);">01</em> <span id="MissNperBlue1" runat="server"></span></li>
                            <li><em id="BlueBall2" class="ball_btn" onclick="javascript:addRedBall(this,2,1,0);">02</em> <span id="MissNperBlue2" runat="server"></span></li>
                            <li><em id="BlueBall3" class="ball_btn" onclick="javascript:addRedBall(this,3,1,0);">03</em> <span id="MissNperBlue3" runat="server"></span></li>
                            <li><em id="BlueBall4" class="ball_btn" onclick="javascript:addRedBall(this,4,1,0);">04</em> <span id="MissNperBlue4" runat="server"></span></li>
                            <li><em id="BlueBall5" class="ball_btn" onclick="javascript:addRedBall(this,5,1,0);">05</em> <span id="MissNperBlue5" runat="server"></span></li>
                            <li><em id="BlueBall6" class="ball_btn" onclick="javascript:addRedBall(this,6,1,0);">06</em> <span id="MissNperBlue6" runat="server"></span></li>
                            <li><em id="BlueBall7" class="ball_btn" onclick="javascript:addRedBall(this,7,1,0);">07</em> <span id="MissNperBlue7" runat="server"></span></li>
                            <li><em id="BlueBall8" class="ball_btn" onclick="javascript:addRedBall(this,8,1,0);">08</em> <span id="MissNperBlue8" runat="server"></span></li>
                            <li><em id="BlueBall9" class="ball_btn" onclick="javascript:addRedBall(this,9,1,0);">09</em> <span id="MissNperBlue9" runat="server"></span></li>
                            <li><em id="BlueBall10" class="ball_btn" onclick="javascript:addRedBall(this,10,1,0);">10</em> <span id="MissNperBlue10" runat="server"></span></li>
                            <li><em id="BlueBall11" class="ball_btn" onclick="javascript:addRedBall(this,11,1,0);">11</em> <span id="MissNperBlue11" runat="server"></span></li>
                            <li><em id="BlueBall12" class="ball_btn" onclick="javascript:addRedBall(this,12,1,0);">12</em> <span id="MissNperBlue12" runat="server"></span></li>
                        </ul>
                        <%--<div class="betting_choose_div_r">
                    <asp:DropDownList ID="DropDownList2" runat="server" class="steps_input">
                        <asp:ListItem>6</asp:ListItem>
                    </asp:DropDownList>
                    <a href="" class="choose_red_ball">机选红球</a>
                    <a href="" class="ball_clear">清空</a>
                </div>--%>
                    </div>
                    <div style="clear: both;"></div>
                </div>
                <div style="text-align: center;">
                    我要选 
                            <select id="RedBall">
                                <option>5</option>
                                <option>6</option>
                                <option>7</option>
                                <option>8</option>
                                <option>9</option>
                                <option>10</option>
                                <option>11</option>
                                <option>12</option>
                                <option>13</option>
                                <option>14</option>
                                <option>15</option>
                                <option>16</option>
                                <option>17</option>
                                <option>18</option>
                                <option>19</option>
                                <option>20</option>
                            </select>
                    个红区号码（包含胆码），
                           <select id="BlueBall">
                               <option>2</option>
                               <option>3</option>
                               <option>4</option>
                               <option>5</option>
                               <option>6</option>
                               <option>7</option>
                               <option>8</option>
                               <option>9</option>
                               <option>10</option>
                               <option>11</option>
                               <option>12</option>
                           </select>
                    个后区号码，
                           <select id="Group">
                               <option>1</option>
                               <option>2</option>
                               <option>3</option>
                               <option>4</option>
                               <option selected="selected">5</option>
                               <option>6</option>
                               <option>7</option>
                               <option>8</option>
                               <option>9</option>
                               <option>10</option>
                               <option>15</option>
                               <option>20</option>
                               <option>30</option>
                               <option>40</option>
                               <option>50</option>
                               <option>60</option>
                               <option>70</option>
                               <option>80</option>
                               <option>90</option>
                               <option>100</option>
                           </select>
                    组
                </div>
            </div>

            <!--Choose-->
            <!--1-->
            <div class="choose_results_ball">
                您选择了 <b><span class="hong2" id="totalCout">5</span></b> 注，共 <b><span class="hong2" id="totalMoney">10</span></b> 元
            </div>
            <div class="betting_choose_confirm">
                <input type="button" onclick="javascript: dtAddChild();" class="choose_num" value="确认选号" />
                <a href="javascript:void(0);" onclick="javascript:clearupAll();" class="choose_a">清空选号</a>
                <%--<a href="" class="choose_a">在线过滤</a>--%>
            </div>
            <!--1-->
            <!--2-->
            <div class="betting_choose_box">
                <div class="betting_choose_box_t">
                    <h3 class="">共<b><span id="zhushu">0</span></b>注</h3>
                    <ul class="betting_choose_tul">
                        <li><a href="javascript:void(0);" onclick="javascript:getPL3Random(1);">机选1注</a></li>
                        <li><a href="javascript:void(0);" onclick="javascript:getPL3Random(5);">机选5注</a></li>
                        <li><a href="javascript:void(0);" onclick="javascript:getPL3Random(10);">机选10注</a></li>
                    </ul>
                    <a class="betting_choose_a" href="javascript:void(0);" onclick="javascript:clearAll();">清空</a>
                </div>
                <dl class="touchu_ul1">
                </dl>
                <%--<div style=" height:300px; width:100%; background:#2155A9;"></div>--%><!--这个div是看这个地方好用不写的程序可以删掉-->

                <ul class="betting_choose_ul">
                    <%--<li><a href="">导入方案</a></li>
                <li><a href="">保存方案</a></li>
                <li><a href="">对比历史开奖</a></li>--%>
                </ul>
            </div>
            <!--2-->
            <div class="betting_choose_num">
                您选了 <span class="hong3 stong" id="yourSelect" name="yourSelect">0 </span>注， 倍投 
            <input type="text" class="betting_choose_btn" id="yourMulti" name="yourMulti" value="1" onblur="fillB()">
                倍，共 <span class="hong3 stong" id="yourMoney" name="yourMoney">0</span> 元
            </div>
            <!--3-->
            <div class="betting_way_box">
                <div class="betting_way_title">
                    <b>投注方式：</b>
                    <ul class="betting_way_t_ul">
                        <li>
                            <input type="radio" checked="checked" id="myself" name="selectMy" onclick="displayck()" />自购</li>
                        <li>
                            <input type="radio" id="together" name="selectMy" onclick="displaycl()" />发起合买</li>
                        <%-- <li>
                        <asp:RadioButton ID="RadioButton3" runat="server" />&nbsp;我要追号</li>--%>
                    </ul>
                    <p class="betting_way_infor">多人出资购买彩票，奖金按购买比例分享</p>
                </div>

                <div class="tab-pane" id="myselfDiv" style="display: none;">
                    <ul class="betting_way_con">
                        <li>
                            <p class="b_w_c_n">方案标题：</p>
                            <input class="b_w_c_box" tabindex="1" autocomplete="off" max="15" type="text" placeholder="双色球第2014151期" id="lotteryName" name="lotteryName">
                            <p class="b_w_c_i">还可以填写<b>15</b>字</p>
                        </li>
                        <li>
                            <p class="b_w_c_n">合买宣言：</p>
                            <textarea class="b_w_c_box2" tabindex="2" autocomplete="off" max="50" placeholder="这个人很聪明，只等中大奖" id="lotteryxy" name="lotteryxy"></textarea>

                            <p class="b_w_c_i">还可以填写<b>50</b>字</p>
                        </li>
                        <li>
                            <p class="b_w_c_n">盈利提成：</p>
                            <input type="hidden" id="selectHid" name="selectHid" value="0.00" />
                            <select name="a3" tabindex="3" autocomplete="off" class="b_w_c_box4" id="ticheng" onchange="javascript:setSelectValue();">
                                <option value="0.00" selected="selected">0%</option>
                                <option value="0.01">1%</option>
                                <option value="0.02">2%</option>
                                <option value="0.03">3%</option>
                                <option value="0.04">4%</option>
                                <option value="0.05">5%</option>
                                <option value="0.06">6%</option>
                                <option value="0.07">7%</option>
                                <option value="0.08">8%</option>
                                <option value="0.09">9%</option>
                                <option value="0.10">10%</option>
                            </select>
                            <p class="b_w_c_i">
                                【盈利提成 =（税后奖金 - 方案金额）× 提成比例】<div>
                                    <div class="b_que">
                                        <div>盈利提成:方案中奖并且盈利。</div>
                                    </div>
                            </p>
                        </li>
                        <li>
                            <p class="b_w_c_n">我要认购：</p>
                            <input class="b_w_c_box3" tabindex="4" value="1" autocomplete="off" type="text" id="mymoney" name="mymoney" onblur="javascript:calculateMyrg(this);" />
                            <p class="b_w_c_i">元  发起人至少认购<b>5</b>%</p>
                        </li>
                        <li>
                            <p class="b_w_c_n">我要保底：</p>
                            <input class="b_w_c_box3" tabindex="5" autocomplete="off" type="text" id="mybd" name="mybd" onblur="javascript:calculateMybd(this);" value="0" />
                            <p class="b_w_c_i">
                                元  <a href="">全保</a>  <%--最多可保底 <b class="hong2">0</b>元--%><div>
                                    <div class="b_que">
                                        <div>合买保底发起时，系统将会先从发起人账户内扣除相应的金额</div>
                                    </div>
                            </p>
                        </li>
                        <li>
                            <p class="b_w_c_n">是否公开：</p>
                            <dl class="b_w_c_dl">
                                <input type="hidden" id="gongkaiHid" name="gongkaiHid" value="1" />
                                <dd>
                                    <input type="radio" checked="checked" id="gongkai1" name="gongkai" onclick="javascript: setgongkai(1);" />公开</dd>
                                <dd>
                                    <input type="radio" id="gongkai2" name="gongkai" onclick="javascript: setgongkai(2);" />&nbsp;销售截止后公开</dd>
                                <dd>
                                    <input type="radio" id="gongkai3" name="gongkai" onclick="javascript: setgongkai(3);" />&nbsp;仅对认购用户公开</dd>
                            </dl>
                        </li>
                    </ul>
                    <div class="betting_way_bottom">
                        <p>您需支付：<b><span id="zhifu">0</span></b>元(认购<b><span id="rengou">0</span></b>元 + 保底<b><span id="baodi">0</span></b>元) </p>
                        <p class="b_right">注：方案进度+保底≥100%，即可出票</p>
                    </div>
                </div>
            </div>
            <!--3-->
            <div class="betting_choose_confirm">
                <input type="button" onclick="javascript: addBuyInfo();" value="确认投注" class="choose_num" />
            </div>
            <p class="betting_agree">
                <input type="checkbox" checked="checked" id="lookXieyi" />
                我已阅读并同意<a href="">&lt;&lt;用户委托投注协议&gt;&gt;</a>
            </p>
            <p class="betting_t">
                <span>双色球中奖说明</span>
            </p>
            <div class="betting_award">
                <div class="cy_lottery_div6">
                    <ul class="cy_table5_tr">
                        <li class="w_70">奖级</li>
                        <li class="w_140">中奖条件</li>
                        <li class="w_70">奖金</li>
                    </ul>
                    <dl class="cy_lotter_d7">
                        <dt>一等奖</dt>
                        <dd>
                            <div class="cy_table5_div">
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span cy_table5_span1"></span>
                                <span class="cy_table5_span cy_table5_span1"></span>
                            </div>
                        </dd>
                        <dt><span class="table_center">浮动</span></dt>
                    </dl>
                    <dl class="cy_lotter_d7">
                        <dt>二等奖</dt>
                        <dd>
                            <div class="cy_table5_div">
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span cy_table5_span1"></span>
                            </div>
                        </dd>
                        <dt><span class="table_center">浮动</span></dt>
                    </dl>
                    <dl class="cy_lotter_d7">
                        <dt>三等奖</dt>
                        <dd>
                            <div class="cy_table5_div">
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                            </div>
                        </dd>
                        <dt><span class="table_center">浮动</span></dt>
                    </dl>
                    <dl class="cy_lotter_d7">
                        <dt></dt>
                        <dd>
                            <div class="cy_table5_div">
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span cy_table5_span1"></span>
                                <span class="cy_table5_span cy_table5_span1"></span>
                            </div>
                        </dd>
                        <dt><span class="table_center">浮动</span></dt>
                    </dl>
                    <dl class="cy_lotter_d7">
                        <dt>四等奖</dt>
                        <dd>
                            <div class="cy_table5_div">
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span cy_table5_span1"></span>
                            </div>
                        </dd>
                        <dt><span class="table_center">200元</span></dt>
                    </dl>
                    <dl class="cy_lotter_d7">
                        <dt></dt>
                        <dd>
                            <div class="cy_table5_div">
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span cy_table5_span1"></span>
                                <span class="cy_table5_span cy_table5_span1"></span>
                            </div>
                        </dd>
                        <dt><span class="table_center">200元</span></dt>
                    </dl>
                    <dl class="cy_lotter_d7">
                        <dt>五等奖</dt>
                        <dd>
                            <div class="cy_table5_div">
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                            </div>
                        </dd>
                        <dt><span class="table_center">50元</span></dt>
                    </dl>
                    <dl class="cy_lotter_d7">
                        <dt></dt>
                        <dd>
                            <div class="cy_table5_div">
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span cy_table5_span1"></span>
                            </div>
                        </dd>
                        <dt><span class="table_center">50元</span></dt>
                    </dl>
                    <dl class="cy_lotter_d7">
                        <dt></dt>
                        <dd>
                            <div class="cy_table5_div">
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span cy_table5_span1"></span>
                                <span class="cy_table5_span cy_table5_span1"></span>
                            </div>
                        </dd>
                        <dt><span class="table_center">50元</span></dt>
                    </dl>
                    <dl class="cy_lotter_d7">
                        <dt>六等奖</dt>
                        <dd>
                            <div class="cy_table5_div">
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                                <span class="cy_table5_span"></span>
                            </div>
                        </dd>
                        <dt><span class="table_center">10元</span></dt>
                    </dl>
                </div>

            </div>
            <div class="betting_question">
                <%if (problemList != null)
                    {
                        for (int i = 0; i < problemList.Count; i++)
                        {%>
                <dl class="l_lottery_dl1">
                    <dt><%=problemList[i].Name%></dt>
                    <dd><%=problemList[i].answer%></dd>
                </dl>
                <%}
                    } %>
            </div>
        </div>
        <!--Left-->
        <!--Right-->
        <div class="betting_right">
            <uc1:forecast ID="forecast1" runat="server"></uc1:forecast>
            <%-- <div class="betting_predict">
        <div class="betting_predict_t">
            <h2>预测选号</h2>
            <span><a href="ForecastPost_List.aspx">更多&gt;&gt;</a></span>
        </div>
        <ul class="betting_predict_ul">
        <%if (newsList.Count > 0)
          {
              for (int i = 0; i < newsList.Count; i++)
              {%>
              
            <li>·<a href="news_details.aspx?id=<%=newsList[i].id%>&type=9"><%=newsList[i].Title%></a></li> 
            <%}
          } %>
        </ul>
    </div>--%>
            <!--PaiHang-->
            <%--<div class="d_r_t">
            <h2>中彩排行</h2>
            <p>本站累计中奖<span><%=jiangjin2 %></span> 亿元</p>
        </div>
        <ul class="d_paihang">
          <%if (userAccount != null && userAccount.Count > 0)
              {
                  for (int i = 0; i < (userAccount.Count > 12 ? 12 : userAccount.Count); i++) 
                  {
                      %> 
        <li>
                <b <%if(i<3){ %>class="yellowbg"<%}else{ %> class="p_n"<%} %>><%=i+1 %></b>
                <p class="p_n"><%=SelectName(userAccount[i].user_id)%></p>
                <p class="p_date"><%=Convert.ToDecimal(userAccount[i].winTotal) % 100000000 / 10000%> 万元</p>
            </li> 
          <% }
              }%>   
        </ul>--%>
            <!--PaiHang-->
        </div>
        <!--Right-->
    </div>
    <!--BettingContent-->
</asp:Content>
